package oop11;

/**
 * @author oldliu
 * @since 1.0
 */
//usb的摄像头
public class UsbCamera extends Camera implements Usb {
    //品牌和价格
    private String brand;
    private int money;

    public UsbCamera(String brand, int money) {
        this.brand = brand;
        this.money = money;
    }

    //额外的方法，拍照
    @Override
    public void takePhoto(){
        System.out.println("给周围拍照了。。。");
    }

    @Override
    public void plugin() {
        System.out.println(this.brand + "接到了电脑的usb接口上，指示灯亮，开始工作");
    }

    @Override
    public void work() {
        System.out.println("摄像机"+this.brand+"工作中");
        System.out.println("不断录制影像。。。");
    }

    @Override
    public void unplugin() {
        System.out.println(this.brand + "的摄像机从usb接口拔除，设备停止工作");
    }

    @Override
    public String toString() {
        return "usb摄像机{" +
                "品牌:" + brand +
                ", 价格：" + money + "元}";
    }
}
